﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ProcessAnalysis
{
    public static class ExtensionsMethods
    {
        public static T[] SubArray<T>(this T[] data, int index, int length)
        {
            T[] result = new T[length];
            Array.Copy(data, index, result, 0, length);
            return result;
        }

        public static string Join<T>(this T[] data, char separator)
        {
            string res = string.Empty;
            for (int i = 0; i < data.Length - 1; i++)
            {
                res += data[i].ToString() + ",";       
            }
            res += data[data.Length - 1];
            return res;
        }
    }
}
